﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using log4net;

namespace Echegoyen
{
    public class MyLogger : IMyLogger
    {
        public MyLogger()
        {
            //log4net.Config.BasicConfigurator.Configure(); // Log en consola
            log4net.Config.XmlConfigurator.Configure(); // Log en archivo log.txt
        }

        public void Error(string donde, string msg, Exception e)
        {
            log4net.LogManager.GetLogger("Errors").Error(donde + ": " + msg, e);
        }

        public void HttpPerformanceInfo(string donde, string msg, Exception e)
        {
            log4net.LogManager.GetLogger("HttpPerformance").Info(msg, e);
        }
    }
}